<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>css有意思</title>
  <style>
    html,body,.page_layout {height: 100%;margin: 0}
    .page_layout {
      display: flex;flex-direction: column;
    }
    .page_layout_header {
      padding: 10px 20px;background-color: #efefef
    }
    .page_layout_body {
      flex: 1;overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .page_layout_footer {
      padding: 10px 20px;
    }
    .list_item {padding: 16px;border-bottom: 1px solid #efefef}
  </style>
</head>
<body>
  <div class="page_layout">
    <header class="page_layout_header"><h3>inobounce.js</h3></header>
      <main class="page_layout_body">
        <ul id="j-list">
        </ul>
      </main>  
    <footer class="page_layout_footer"><h3>网页底部</h3></footer>
  </div>  
  <!-- https://github.com/lazd/iNoBounce -->
  <!-- https://blog.csdn.net/wwf1225/article/details/109101419 -->
  <script src="./js/inobounce.js"></script>
  <script>
      const renderFn = function(){
        const container = document.querySelector('#j-list')
        let tpl = ''
        for (let index = 0; index < 100; index++) {
          tpl += `<li class="list_item">${index}</li>`          
        }
        container.innerHTML = tpl
      }
      renderFn()
  </script>
</body>
</html>